from math import sqrt
number=int(input('请输入一个整数：'))
def is_prime(num):
    for rea in range(2,int(sqrt(num)+1)):
        if num%rea==0:
            return False
    return True if num !=1 else False
def is_palindrome(num):
    temp=num
    total=0
    while temp>0:
        total=total * 10+temp % 10
        temp//=10
    return num==total
if  is_palindrome(number) and is_prime(number) :
    print('%d是回文素数：' % number)
else:
    print('%d不是回文素数：' % number)
